#include "threadpool.hpp"
#include <memory>
#include <ctime>
#include <sys/types.h>
#include "Task.h"
int main()
{
    srand((unsigned long)time(nullptr) ^ getpid());
   threadpool<Task>::GetInstance()->start();
while(true)
{
    int x = rand() % 10;
    int y = rand() % 5;
    Task t(x,y);
    threadpool<Task>::GetInstance()->push(t);
    std::cout<<"推入一个任务!"<<std::endl;
    sleep(1);
}
    return 0;
}